package context

const SECTION_WEIXIN = "weixin"

type WeixinConfig struct {
	AppId     string
	AppKey    string
	MchId     string
	AppSecret string
}

func (c *Configuration) WeixinConfig() *WeixinConfig {

	return &WeixinConfig{
		AppId:     c.INI.MustValue(SECTION_WEIXIN, "appid", ""),
		AppKey:    c.INI.MustValue(SECTION_WEIXIN, "appkey", ""),
		AppSecret: c.INI.MustValue(SECTION_WEIXIN, "appsecret", ""),
		MchId:     c.INI.MustValue(SECTION_WEIXIN, "mchid", ""),
	}
}
